package com.example.merchant.service;

import com.example.merchant.entity.Customer;
import com.example.merchant.entity.Merchant;

import java.util.ArrayList;

/**
 * 模拟数据库
 */
public class MockDatabase {

    // 写一个静态方法，返回一个Merchant对象
    public static Merchant merchant(){
        Merchant merchant = new Merchant();
        merchant.setId(1);
        merchant.setName("奸商");
        merchant.setMoney(10000.00);
        return  merchant;
    }

    // 写一个静态方法，返回一个List<Customer>列表
    public static ArrayList<Customer> customerList(){
        Customer customer1 = new Customer(1,"貂蝉","女",24,100.00,12345618,64,"a","好","a");
        Customer customer2 = new Customer(2,"甄姬","女",18,50.00,12345618,64,"a","好","a");
        Customer customer3 = new Customer(3,"孙尚香","女",20, 2000.00,12345618,64,"a","好","a");
        Customer customer4 = new Customer(4,"大乔","女",19, 200.00,12345618,64,"a","好","a");
        Customer customer5 = new Customer(5,"小乔","女",18, 200.00,12345618,64,"a","好","a");
        Customer customer8 = new Customer(8,"刘备","男",22,200.00,12345618,64,"a","好","a");
        Customer customer7 = new Customer(7,"关羽","男",17,100.00,12345618,64,"a","好","a");
        Customer customer6 = new Customer(6,"张飞","男",13,800.00,12345618,64,"a","好","a");

        ArrayList<Customer> customerList = new ArrayList<>();
        customerList.add(customer1);
        customerList.add(customer2);
        customerList.add(customer3);
        customerList.add(customer4);
        customerList.add(customer5);
        customerList.add(customer8);
        customerList.add(customer7);
        customerList.add(customer6);
        return customerList;
    }
}
